<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Models\User;
class IndexController extends Controller
{
    /**
     * @return string
     */
    public function user()
    {
        return $users = new User();
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        return view('home/index');
    }

    /**
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function is_logged_in()
    {
        if ($this->user()->is_log_in())
            return view('home/index');
        return redirect('home/login');
    }
}
